import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../LayoutView.vue'
const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: Layout,
      alias: '/layout',
      children:[
        {
          path:'/userMange',
          name:'userMange',
          component:()=>import('../components/userManage.vue')
        },
        {
          path:'/carousel_add',
          name:'carousel_add',
          component:()=>import('../components/carousel_add.vue')
        } ,
        {
          path:'/carousel_list',
          name:'carousel_list',
          component:()=>import('../components/carousel_list.vue')
        },
        {
          path:'/nav_add',
          name:'nav_add',
          component:()=>import('../components/nav_add.vue')
        },
        {
          path:'/nav_list',
          name:'nav_list',
          component:()=>import('../components/nav_list.vue')
        },
        {
          path:'/SystemView',
          name:'SystemView',
          component:()=>import('../components/SystemView.vue')
        },
        {
          path:'/module_meg',
          name:'module_meg',
          component:()=>import('../components/module_meg.vue')
        },
    ]
  },
    {
      path: '/home',
      name: 'home',
      component: () => import('../views/HomeView.vue'),
    },
    {
      path: '/Login',
      name: 'Login',
      component: () => import('../views/LoginView.vue'),
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('../views/registerView.vue'),
    },

  ],
})

export default router
